#ifndef __ENTITYMANAGER_H__
#define __ENTITYMANAGER_H__
#include "Entity.h"
#include <vector>
#include <iostream>

struct OperatorTest;
typedef std::vector<Entity*> EntityList;
const int CONST_VAL = 100;
namespace MyNS {
const int CONST_VAL = 200;

} /* MyNS */

class Singleton
{
public:

    static Singleton& getInstance()
    {
        static Singleton ins;

        return ins;
    }
    int& getValue() { return a; }

private:
    Singleton(): a(0) {}
    Singleton(const Singleton&) {};
    Singleton& operator =(const Singleton&) {};

private:
    int a;
};

class  EntityManager
{
    friend struct OperatorTest;
public:
	 EntityManager();
	~EntityManager();

public:
	std::vector<Entity*> getEntityList();
	std::string getClassName()
	{
		std::cout << " ClassName EntityManager ---	!!" << std::endl;
		return "EntityManager";
	}

	static unsigned int GetStaticValue();

	inline static int GetFunctionValue()
	{
		return 10;
	}

    //void setStaticValue(int value) { xcy_int = value; }
    const int& getStaticValue() { return xcy_int; }

	void AddEntity(Entity* entity);
	void PrintEntityListInfo(std::string str,int a);
	void PrintEntityListInfoTest(std::string str, int a);

	void AddFuntiocnTest();
    void modifyConstVal();


	void AddEntityPrivate(Entity* entity)
	{
		entity_list_.push_back(entity);
	}
public:
	std::vector<Entity*> entity_list_;
    static const int xcy_int;
    const int class_const_val;
};

static int g_static_val = 10;

int getTestValueXcy();


#endif
